<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="cHead" ContentPlaceHolderID="cphHead" runat="server">
    <% this.Page.Title = (string)ViewData["PageTitle"]; %>
</asp:Content>

<asp:Content ID="cJScripts" ContentPlaceHolderID="cphJScripts" runat="server">
    <script type="text/javascript">
    var RecaptchaOptions = {
        lang: "fr"
    };
    $("a.green").click(function () {
        $(this).addClass("loading");
        $('#contact form:eq(0)').submit();
    });

    $("a.blue").click(function () {
        $('#contact form')[0].reset();
    });
    </script>
</asp:Content>

<asp:Content ID="cMainContent" ContentPlaceHolderID="cphMainContent" runat="server">
<div id="contact">
    <%= Html.ValidationSummary(ScoutNET.Resources.Master_Form_ErrorMessage)%>

    <% using (Html.BeginForm()) {%>
        <% if (!User.Identity.IsAuthenticated) { %>
		<p>
		    <label for="firstname"> <%= ScoutNET.Resources.Contact_Index_FirstnameReq %> :</label>
            <%= Html.TextBox("firstname", null, new { @class = "small" })%>
        </p>
        
        <p>
            <label for="lastname"> <%= ScoutNET.Resources.Contact_Index_LastnameReq %> :</label>
            <%= Html.TextBox("lastname", null, new { @class = "small" })%>
        </p>
        
        <p>
            <label for="email"> <%= ScoutNET.Resources.Contact_Index_MailReq %> :</label>
            <%= Html.TextBox("email", null, new { @class = "small" })%>
        </p>
        <% }else{ %>
        <div class="label"> <%= ScoutNET.Resources.Contact_Index_Firstname %> :</div> <%= ViewData["Firstname"]%><div class="clr"></div>
        <div class="label"> <%= ScoutNET.Resources.Contact_Index_Lastname %> :</div> <%= ViewData["Lastname"]%><div class="clr"></div>
        <div class="label"> <%= ScoutNET.Resources.Contact_Index_Mail %> :</div> <%= ViewData["Mail"]%><div class="clr"></div>
        <% } %>
        
        <p>
            <label for="subject"><%= ScoutNET.Resources.Contact_Index_Sujet %> :</label>
            <%= Html.TextBox("subject", null, new { @class = "large" })%>
        </p>
        
        <p>
            <label for="message"> <%= ScoutNET.Resources.Contact_Index_Message %> :</label>
            <%= Html.TextArea("message", null, new { rows = "3", cols = "15" })%>
        </p>
        
        <p>
            <label for="section"> <%= ScoutNET.Resources.Contact_Index_Section %> :</label>
            <%= Html.DropDownList("section", null, new { @class = "little" })%>
        </p>
        
        <%= Html.AntiForgeryToken() %>

        <% if (!User.Identity.IsAuthenticated) { %>
        <label class="recaptcha" for="recaptcha_response_field"><%= ScoutNET.Resources.Contact_Index_Captcha %> : </label>
        <%= Html.GenerateCaptcha(HttpContext.Current) %>
        <% } %>        
        <div class="blockButton">
		    <a class="mediumBtn green awesome" href="javascript:void(0);" title="<%= ScoutNET.Resources.Master_Button_Submit %>"><%= ScoutNET.Resources.Master_Button_Submit%></a>
            <a class="mediumBtn blue awesome" href="javascript:void(0);" title="<%= ScoutNET.Resources.Master_Button_Reset %>"><%= ScoutNET.Resources.Master_Button_Reset%></a>
	    </div>
	<% } %>
</div>
</asp:Content>
